
clear all
*PREFERENCE GAP AS IV
************************************
*Numeric Export disabled
local TEX ""
local TEXON 0 //Change "0" to "1" to enable exporting numeric results to .txt files
if !`TEXON' local TEX "*"
*Also need to install texresults2
*ssc install texresults2
************************************
************************************
*Figure Export disabled
local FIG ""
local FIGON 0 //Change "0" to "1" to enable exporting figures (RELEVANT FOLDERS MUST FIRST BE CREATED)
if !`FIGON' local FIG "*"
************************************

*Necessary packages
*ssc install cem

**************************
*Set workding directory
**************************

*Load Gilens' data and recode variables
do "Enns_SociologicalScience_Reproduction\LoadGilensDataRecodeConfirmAccuracy.do"


***********************************************************
***********************************************************
*Prference Gap as IV forces opposite signed coefficients
*Simulations
***********************************************************
***********************************************************
**Appendix 11.2: Equal Responsiveness in DGP
***********************************************************
//Store the coef used in the simulation dgp below to report in text.
logit policyadopted pred90_sw
mat betaDGP = e(b)
local coef_eq = betaDGP[1,1]
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefeq) result(`coef_eq') round(2) replace
*****
program sim_gapeq
use "Enns_SociologicalScience_Reproduction\DS1_0.dta", clear

//Recode outcome so dichotomous
quietly: gen policyadopted =.
quietly: recode policyadopted .=0 if OUTCOME==0
quietly: recode policyadopted .=1 if OUTCOME==2
quietly: recode policyadopted .=1 if OUTCOME==3
quietly: recode policyadopted .=1 if OUTCOME==4

*NOTE: Not using log odds, because preference gap is calculated based on raw percentages


//continuous measure of preference gap
quietly: gen dif_90_10=(pred90_sw - pred10_sw)

**********************
*Estimate parameters to be used in DGP for simulations below.
**********************

*policy only responsive to preference gap
quietly: logit policyadopted pred90_sw 
//Save the coefficients from the previus model to be used in simulations.
mat betaDGP = e(b)
local coef_9050 = betaDGP[1,1]
local constant_9050 = betaDGP[1,2]

//Save the mean, min, and max of the policy prefernces of the 90th, 50th, and 10th income
//percentiles to be used in simulations 
quietly: sum pred90_sw 
local high_mean = `r(mean)'
local high_min = `r(min)'
local high_max = `r(max)'

quietly: sum pred10_sw 
local low_mean = `r(mean)'
local low_min = `r(min)'
local low_max = `r(max)'

quietly: sum pred50_sw 
local mid_mean = `r(mean)'
local mid_min = `r(min)'
local mid_max = `r(max)'

//Create a matrix with the mean values from above.
matrix mean = (`high_mean', `mid_mean', `low_mean')

//Generate coveriance matrix
quietly: cor pred90_sw pred50_sw pred10_sw, cov
mat cov = r(C)

*****************************************
//Generate simulated preferences of the 90th, 50th and 10th income percentiles
//based on characteristics of the observed data.
clear
*high represents 90th income percentile
*mid repersents 50th income percentile
*low represents 10th income percentile
quietly: drawnorm high mid low, n(2000) means(mean) cov(cov)
quietly: drop if high<`high_min' | high>`high_max' | low<`low_min' | low>`low_max'| mid<`mid_min' | mid>`mid_max'

***************************************************************************************
//generate predicted policy adoption based on actual parameters in the data above.
//DGP: policy change responds equally to 50th and 90th income group preferences
quietly: gen yhat_9050 = exp(`constant_9050' + (`coef_9050' * high) + (`coef_9050' * mid)) / (1 + exp(`constant_9050' + (`coef_9050' * high) + (`coef_9050' * mid))) 
quietly:     gen predictedoutcome9050 = 0 
quietly:     replace predictedoutcome9050 = 1 if runiform() < yhat_9050 
quietly: drop yhat_9050
*gen preference gap
quietly: gen dif_90_50 = (high-mid)
end
***************************************************************************************
***************************************************************************************

**************************************************
*Set seed 
*https://www.random.org/
set seed 45353807
tempfile gapiv
tempname temp1
postfile `temp1' ngap coefgap segap coefgapcon segapcon coefgapz ///
			neq coefh seh coefm semid coefc sec critval pvalcoefdif ///
			using "`gapiv'", replace

forval i = 1/1000 {
*run program that simulates series
sim_gapeq

*preference gap as IV
quietly: logit predictedoutcome9050 dif_90_50
scalar ngap = e(N)
mat def tab = r(table)
scalar coefgap = tab[1,1]
scalar segap = tab[2,1]
scalar coefgapcon = tab[1,2]
scalar segapcon = tab[2,2]
scalar coefgapz = tab[3,1]

*Force high and low preferences to be equal and opposite
constraint define 1 _b[high] = -_b[mid]     
logit predictedoutcome9050 high mid, constraint(1)
scalar neq = e(N)
mat def tabtwo = r(table)
scalar coefh = tabtwo[1,1]
scalar seh = tabtwo[2,1]
scalar coefm = tabtwo[1,2]
scalar semid = tabtwo[2,2]
scalar coefc = tabtwo[1,3]
scalar sec = tabtwo[2,3]
scalar critval = tabtwo[8,1]

test _b[high] = _b[mid] //test of coefficients statistically different
scalar pvalcoefdif = r(p)
post `temp1' (ngap) (coefgap) (segap) (coefgapcon) (segapcon) (coefgapz) (neq) (coefh) (seh) (coefm) (semid) (coefc) (sec) (critval) (pvalcoefdif)
}
postclose `temp1' //write results to dataset 

*************************************************
*Table A-8
*Uses data from simulations above
*************************************************

use "`gapiv'", clear //load new dataset with simulated data  
*obtain the values of the 97, 98, 99, and 100th simulation
forvalues i = 97(1)100 {
local ngap`i' = ngap[`i']
local coefgap`i' = coefgap[`i']
local segap`i' = segap[`i']
local coefgapcon`i' = coefgapcon[`i']
local segapcon`i' = segapcon[`i']
local neq`i' = neq[`i']
local coefh`i' = coefh[`i']
local seh`i' = seh[`i']
local coefm`i' = coefm[`i']
local semid`i' = semid[`i']
local coefc`i' = coefc[`i']
local sec`i' = sec[`i']
}

sum coefgapz if abs(coefgapz)>critval
di `r(N)'
local n = _N
local percsign = 100*`r(N)'/`n'
di `percsign'

sum coefgap
local meancoefgap = r(mean)

`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(percsign) result(`percsign') round(0) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(meancoefgap) result(`meancoefgap') round(2) append 


`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(ngapns) result(`ngap97') round(0) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(ngapne) result(`ngap98') round(0) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(ngapnn) result(`ngap99') round(0) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(ngapnoh) result(`ngap100') round(0) append 

`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefgapns) result(`coefgap97') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefgapne) result(`coefgap98') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefgapnn) result(`coefgap99') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefgapnoh) result(`coefgap100') round(2) append 

`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(segapns) result(`segap97') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(segapne) result(`segap98') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(segapnn) result(`segap99') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(segapnoh) result(`segap100') round(2) append 

`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefgapconns) result(`coefgapcon97') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefgapconne) result(`coefgapcon98') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefgapconnn) result(`coefgapcon99') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefgapconnoh) result(`coefgapcon100') round(2) append 

`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(segapconns) result(`segapcon97') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(segapconne) result(`segapcon98') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(segapconnn) result(`segapcon99') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(segapconnoh) result(`segapcon100') round(2) append 

`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefhns) result(`coefh97') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefhne) result(`coefh98') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefhnn) result(`coefh99') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefhnoh) result(`coefh100') round(2) append 

`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(sehns) result(`seh97') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(sehne) result(`seh98') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(sehnn) result(`seh99') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(sehnoh) result(`seh100') round(2) append 

`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefmns) result(`coefm97') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefmne) result(`coefm98') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefmnn) result(`coefm99') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefmnoh) result(`coefm100') round(2) append 

`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(semidns) result(`semid97') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(semidne) result(`semid98') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(semidnn) result(`semid99') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(semidnoh) result(`semid100') round(2) append 

`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefcns) result(`coefc97') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefcne) result(`coefc98') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefcnn) result(`coefc99') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefcnoh) result(`coefc100') round(2) append 

`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(secns) result(`sec97') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(secne) result(`sec98') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(secnn) result(`sec99') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(secnoh) result(`sec100') round(2) append 

`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(neqns) result(`neq97') round(0) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(neqne) result(`neq98') round(0) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(neqnn) result(`neq99') round(0) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(neqnoh) result(`neq100') round(0) append 



************************************************************
************************************************************
************************************************************
*Appendix 11.3:
*Responsiveness Differs Across Groups in DGP 
************************************************************
************************************************************
************************************************************

use "Enns_SociologicalScience_Reproduction\DS1_0.dta", clear
//Recode outcome so dichotomous
quietly: gen policyadopted =.
quietly: recode policyadopted .=0 if OUTCOME==0
quietly: recode policyadopted .=1 if OUTCOME==2
quietly: recode policyadopted .=1 if OUTCOME==3
quietly: recode policyadopted .=1 if OUTCOME==4
*Set gap
logit policyadopted pred90_sw 
mat betaDGP = e(b)
local coef_90 = betaDGP[1,1]
di `coef_90'
local gap = `coef_90'*.25
di `gap'
local coef_50 = `coef_90'-`gap'
di `coef_50'
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(respgap) result(`gap') round(2) append 

****************************************************************
****************************************************************
//responsiveness gap
program sim_responsivenessgap
use "Enns_SociologicalScience_Reproduction\DS1_0.dta", clear
//Recode outcome so dichotomous
quietly: gen policyadopted =.
quietly: recode policyadopted .=0 if OUTCOME==0
quietly: recode policyadopted .=1 if OUTCOME==2
quietly: recode policyadopted .=1 if OUTCOME==3
quietly: recode policyadopted .=1 if OUTCOME==4


**********************
*Estimate parameters to be used in DGP for simulations below.
**********************

*policy only responsive to preference gap
quietly: logit policyadopted pred90_sw 
//Save the coefficients from the previus model to be used in simulations.
mat betaDGP = e(b)
local coef_90 = betaDGP[1,1]
di `coef_90'
local constant_9050 = betaDGP[1,2]
local gap = `coef_90'*.25
di `gap'
local coef_50 = `coef_90'-`gap'
di `coef_50'
//Save the mean, min, and max of the policy prefernces of the 90th, 50th, and 10th income
//percentiles to be used in simulations 
quietly: sum pred90_sw 
local high_mean = `r(mean)'
local high_min = `r(min)'
local high_max = `r(max)'

quietly: sum pred10_sw 
local low_mean = `r(mean)'
local low_min = `r(min)'
local low_max = `r(max)'

quietly: sum pred50_sw 
local mid_mean = `r(mean)'
local mid_min = `r(min)'
local mid_max = `r(max)'

//Create a matrix with the mean values from above.
matrix mean = (`high_mean', `mid_mean', `low_mean')

//Generate coveriance matrix
quietly: cor pred90_sw pred50_sw pred10_sw, cov
mat cov = r(C)

*****************************************
//Generate simulated preferences of the 90th, 50th and 10th income percentiles
//based on characteristics of the observed data.
clear
*high represents 90th income percentile
*mid repersents 50th income percentile
*low represents 10th income percentile
quietly: drawnorm high mid low, n(2000) means(mean) cov(cov)
quietly: drop if high<`high_min' | high>`high_max' | low<`low_min' | low>`low_max'| mid<`mid_min' | mid>`mid_max'

***************************************************************************************
//generate predicted policy adoption based on actual parameters in the data above.
//DGP: policy change responds equally to 50th and 90th income group preferences
quietly: gen yhat_9050 = exp(`constant_9050' + (`coef_90' * high) + (`coef_50' * mid)) / (1 + exp(`constant_9050' + (`coef_90' * high) + (`coef_50' * mid))) 
quietly:     gen predictedoutcome9050 = 0 
quietly:     replace predictedoutcome9050 = 1 if runiform() < yhat_9050 
quietly: drop yhat_9050
*gen preference gap
quietly: gen dif_90_50 = (high-mid)
end
***************************************************************************************
***************************************************************************************

**************************************************
*Set seed 
*https://www.random.org/
set seed 45353807
tempfile gapiv2
tempname temp2
postfile `temp2' ngap coefgap coefgapcon coefgapz ///
			neq coefh coefm coefc pvalcoefdif  ///
			using "`gapiv2'", replace

forval i = 1/1000 {
*run program that simulates series
sim_responsivenessgap

*preference gap as IV
logit predictedoutcome9050 dif_90_50
scalar ngap = e(N)
mat def tab = r(table)
scalar coefgap = tab[1,1]
scalar coefgapcon = tab[1,2]
scalar coefgapz = tab[3,1]

*Force high and low preferences to be equal and opposite
constraint define 1 _b[high] = -_b[mid]     
logit predictedoutcome9050 high mid, constraint(1)
scalar neq = e(N)
mat def coef = e(b)
scalar coefh = coef[1,1]
scalar coefm = coef[1,2]
scalar coefc = coef[1,3]
test _b[high] = _b[mid] //test of coefficients statistically different
scalar pvalcoefdif = r(p)
post `temp2' (ngap) (coefgap) (coefgapcon) (coefgapz) (neq) (coefh) (coefm) (coefc) (pvalcoefdif)
}
postclose `temp2' //write results to dataset 

use "`gapiv2'", clear //load temp dataset with simulated data  

*************************************
*Figure A-6
*************************************

histogram coefgap, freq bins(50) ///
fcolor(gray%40) lcolor(black%80) ///
xline(.60810453, lcolor(black) lwidth(medthick)) ///
xtitle("Estimated Preference Gap Variable Coefficient") ///
ylabel(, nogrid notick) ///
xlabel(-2.5[.5]1, nogrid notick) ///
graphregion(fcolor(white) lcolor(white)) ///
plotregion(lcolor(black) lwidth(medium)) ///
ysize(3) xsize(4) ///
text(50 .4 "Actual" "Value" "in DGP", color(black))
`FIG'graph export AppendixFigures/PrefGapIV.eps, replace
`FIG'graph export AppendixFigures/PrefGapIV.pdf, as(pdf) replace





***********************************************************
***********************************************************
*Prference Gap as IV forces opposite signed coefficients
*Show using Gilens' Data
*Tabe A-7, Column 1
***********************************************************
***********************************************************
use "Enns_SociologicalScience_Reproduction\DS1_0.dta", clear

//Recode outcome so dichotomous
quietly: gen policyadopted =.
quietly: recode policyadopted .=0 if OUTCOME==0
quietly: recode policyadopted .=1 if OUTCOME==2
quietly: recode policyadopted .=1 if OUTCOME==3
quietly: recode policyadopted .=1 if OUTCOME==4

gen D90_10 = pred90_sw - pred10_sw
logit policyadopted D90_10
mat def results = r(table)
local coefprefgapntyten = results[1,1]
local seprefgapntyten = results[2,1]
local consprefgap = results[1,2]
local consprefgapse = results[2,2]
local llgap = e(ll)
local nprefgap = e(N)
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefprefgapntyten) result(`coefprefgapntyten') round(2) append //coef
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(seprefgapntyten) result(`seprefgapntyten') round(2) append //se
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(consprefgap) result(`consprefgap') round(2) append //coef
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(consprefgapse) result(`consprefgapse') round(2) append //se
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(llgap) result(`llgap') round(3) append //log likelihood
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(nprefgap) result(`nprefgap') round(0) append //n

***************************************************
*Table A-7, Column 2
***************************************************

use "Enns_SociologicalScience_Reproduction\DS1_0.dta", clear

//Recode outcome so dichotomous
quietly: gen policyadopted =.
quietly: recode policyadopted .=0 if OUTCOME==0
quietly: recode policyadopted .=1 if OUTCOME==2
quietly: recode policyadopted .=1 if OUTCOME==3
quietly: recode policyadopted .=1 if OUTCOME==4
*Constrain coefficients to be opposite signs
*Reproduces above preference gap result exactly
constraint define 1 _b[pred90_sw] = -_b[pred10_sw]     
logit policyadopted pred90_sw pred10_sw, constraint(1)
mat def results = r(table)
local consprefgapntyten = results[1,3]
local consprefgapsentyten = results[2,3]
local llg = e(ll)

`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefprefgapnty) coef(pred90_sw) round(2) append //coef
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(seprefgapnty) se(pred90_sw) round(2) append //se 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(coefprefgapten) coef(pred10_sw) round(2) append //coef
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(seprefgapten) se(pred10_sw) round(2) append //se 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(consprefgapntyten) result(`consprefgapntyten') round(2) append //coef
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(consprefgapsentyten) result(`consprefgapsentyten') round(2) append //se
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(llg) result(`llg') round(3) append //log likelihood
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(nprefgapntyten) result(e(N)) round(0) append //n



************************************************
************************************************
**When Adding a Preference Gap as IV does not change the model in any way
************************************************
************************************************
do "Enns_SociologicalScience_Reproduction\LoadGilensDataRecodeConfirmAccuracy.do"
*Correlation of incoem group preferences
cor pred50_sw pred10_sw pred90_sw

*gen preference gap

gen D90_50 = pred90_sw - pred50_sw
gen D50_10 = pred50_sw - pred10_sw

**************************************
*Table A-9
**************************************
cor pred50_sw D90_50 D50_10
mat define cor = r(C)
local ftyfty = cor[1,1]
local dntyftyntyfty = cor[2,2]
local dftytenftyten = cor[3,3]
local ftydntyfty = cor[2,1]
local ftydftyten = cor[3,1]
local dntyftyftyten = cor[3,2]

**************************************
**************************************
*Table A-10
**************************************
**************************************
logit policyadopted pred50_sw pred90_sw  
mat def results = r(table)
local predmidsw = results[1,1]
local sepredmidsw = results[2,1]
local predhighsw = results[1,2]
local sepredhighsw = results[2,2]
local constant = results[1,3]
local constantse = results[2,3]
local llls = e(ll)
local rrr = e(r2_p)

logit policyadopted pred50_sw D90_50 
mat def results = r(table)
local predmidswx = results[1,1]
local sepredmidswx = results[2,1]
local gaphighmid = results[1,2]
local segaphighmid = results[2,2]
local constantx = results[1,3]
local seconstantx = results[2,3]
local llll = e(ll)
local rrrr = e(r2_p)

*Export correlations
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(ftyfty) result(`ftyfty') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(dntyftyntyfty) result(`dntyftyntyfty') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(dftytenftyten) result(`dftytenftyten') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(ftydntyfty) result(`ftydntyfty') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(ftydftyten) result(`ftydftyten') round(2) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(dntyftyftyten) result(`dntyftyftyten') round(2) append 
*Export results from logit policyadopted pred50_sw pred90_sw 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(predmidsw) result(`predmidsw') round(3) append //coef
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(sepredmidsw) result(`sepredmidsw') round(3) append //se
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(predhighsw) result(`predhighsw') round(3) append //coef
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(sepredhighsw) result(`sepredhighsw') round(3) append //se
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(constant) result(`constant') round(3) append //coef
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(seconstant) result(`constantse') round(3) append //se
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(llls) result(`llls') round(3) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(rrr) result(`rrr') round(3) append 
*Export results from logit policyadopted pred50_sw D90_50 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(predmidswx) result(`predmidswx') round(3) append //coef
**# Bookmark #1
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(sepredmidswx) result(`sepredmidswx') round(3) append //se
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(gaphighmid) result(`gaphighmid') round(3) append //coef
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(segaphighmid) result(`segaphighmid') round(3) append //se
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(constantx) result(`constantx') round(3) append //coef
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(seconstantx) result(`seconstantx') round(3) append //se
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(llll) result(`llll') round(3) append 
`TEX'texresults2 using TxtFiles_NumericalResults\collinearity.txt, texmacro(rrrr) result(`rrrr') round(3) append 


***********************************************************
***********************************************************
